#pragma once
#include "IHandler.h"
#include "IMessageSystem.h"
#include "ISyncEventManager.h"

class AsyncConnectHandler:public IConnectHandler,public CObject
{
public:
	AsyncConnectHandler(IMessageSystem::CallBack::OnConnectSuccess,IMessageSystem::CallBack::OnConnectFailed,void*);

	void SetManager(ISyncEventManager* pManager){m_pManager = pManager;}

	void Success(IPumpService*);

	void Fail();

private:
	IMessageSystem::CallBack::OnConnectSuccess m_SuccessCallback;
	IMessageSystem::CallBack::OnConnectFailed  m_FailedCallback;
	void*									   m_pUserData;
	ISyncEventManager*						   m_pManager;			
};